import React, { PureComponent } from "react"
import { connect } from "react-redux"
import Swiper from "@/components/main/index/section/swiper"
import { FloorShowStyle } from "@/components/main/index/section/styled"
import { loadGetRecommendAsync } from "@/components/main/index/actionCreator"

class GetRecommend extends PureComponent {
    constructor(){
        super();
        this.state={
            page:1
        }
    }
    

    render() {
        // console.log(this.props.floorShowData.toJS());
        
        return  <div>111</div>// this.props.floorShowData.size!== 0 ? (

        //     <FloorShowStyle>
        //         {
        //             this.props.floorShowData.map((item,index)=>(
        //                 <div key={index}>
        //                     <p>{item.get("title")}</p>
        //                     <div style={{width:"100%",height:"100px"}}>
        //                         <img src={item.get("list").get(1)} alt="" style={{width:"100%",height:"auto"}}/>
        //                     </div>
        //                    {
        //                         <Swiper height={"220px"} swiperConfig={{ slidesPerView: 3}}>
        //                         {
        //                               item.get("list").slice(1).map((it,dex)=>(
        //                                  <div className="swiper-slide" key={dex} >
        //                                   <img src={it.get("pic")} style={{ height: "145px", width: "106px" }} alt="" />
        //                                       <p>{it.get("schedular_name")}</p>
        //                                   </div>
        //                              ))
        //                          }
        //                          </Swiper>
        //                    } 
        //                 </div>
        //             ))
        //         }
        //     </FloorShowStyle>
        // ) : (null) 
    }
    componentDidMount() {
        this.props.pageInit.bind(this,{abbreviation:this.props.currentCity.abbreviation,page:++this.state.page})()
    }
}
const mapStateToProps = (state) => {
    return {
        currentCity: state.getIn(['indexReducer', 'currentCity']).toJS(),
        recommendData: state.getIn(["indexReducer", "recommendData"])

    }
}
const mapDispatchToProps = (dispatch,data) => ({
    pageInit() {
        dispatch(loadGetRecommendAsync(dispatch, data))
    },

})
export default connect(mapStateToProps, mapDispatchToProps)(GetRecommend)



